#include <string.h>
#include <stdlib.h>


struct node {
	char value[50]; 
	node* next; 
	__int64 count;
	node() {
		count = 0;
		next = NULL;
	}
};

struct list {
	node* head; 
	node* tail; 
	list() {
		head = tail = NULL;
	}

	bool chk_empty(list l) {
		return (l.head==NULL);
	}

	void push_back(char* n) {
		node* c = (node*)malloc(sizeof(node));
		strcpy(c->value, n);
		c->next = NULL;
		c->count = 1;
		if (chk_empty(*this))
			head = c;
		else
			tail->next = c;
		tail = c;
	}

	node* search(char *n) {
		while (head != NULL) {
			if (!strcmp(head->value,n))
				return head;
			head = head->next;
		}
		return NULL;
	} 
};


